// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Mp3PreviewFactory.cs" company="GT">
//   Gunther Taborga
// </copyright>
// <summary>
//   Defines the Mp3Preview type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace BatchID3.Mp3
{
    using BatchID3.Enumerations;
    using BatchID3.Extensions;

    public class Mp3PreviewFactory : IMp3PreviewFactory
    {
        private readonly IMp3EntityFactory mp3EntityFactory;

        public Mp3PreviewFactory(IMp3EntityFactory mp3EntityFactory)
        {
            this.mp3EntityFactory = mp3EntityFactory;
        }

        public IMp3Entity GetMp3Preview()
        {
            var mp3Entity = this.mp3EntityFactory.CreateMp3Entity("FileName.mp3");

            mp3Entity.Artist = TagToken.Artist.GetFirstStringValue();
            mp3Entity.Album = TagToken.Album.GetFirstStringValue();
            mp3Entity.AlbumArtist = TagToken.AlbumArtist.GetFirstStringValue();
            mp3Entity.BeatsPerMinute = 140;
            mp3Entity.Title = TagToken.Title.GetFirstStringValue();
            mp3Entity.Track = 1;

            return mp3Entity;
        }
    }
}